Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
How to solve "Permission denied" in getUserMedia?

I'm in Chrome on Windows.

I would like to use the camera in my web app that with a domain, say www.example.com.

We have a dev environment called www.dev.example.com

We run the following code to get the camera video :

navigator.mediaDevices.getUserMedia({
        video: {
            facingMode: 'environment',
            audio: !1
        }
    }).then(function(e) {
        console.log('The camera is working');
    })

in the our dev domain (www.dev.example.com) this code is working properly. However, when we change the domain to www.example.com, the code is not working any more (the exact same code). We get the error :

Uncaught (in promise) DOMException: Permission denied

We tried using Chrome Dev Console. In fact, this code works on any domain (including StackOverflow) except our domain www.example.com.

Does anyone know if there is something to check related to the domain please in order to make this code work ?

Thanks Cheers, Does anyone know how to solve that please.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda